package com.xpgk.mvc.statistic.dailyTotalStatistic;

import java.util.Date;

import com.jfinal.log.Log;
import com.xpgk.annotation.Table;
import com.xpgk.mvc.base.BaseModel;
import com.xpgk.mvc.bentryRegister.Customer;
import com.xpgk.tools.ToolDateTime;

/**
 * 日护理合计表model
 */
@SuppressWarnings("unused")
@Table(tableName = DailyNursingTotal.table_name)
public class DailyNursingTotal extends  BaseModel<DailyNursingTotal>{
	
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 2998826561243450854L;
	
	private static final Log log = Log.getLog(DailyNursingTotal.class);
	public static final DailyNursingTotal dao = new DailyNursingTotal().dao();
	
	
	/**
	 * 表名称
	 */
	public static final String table_name = "sb_customer_total_daily";


	/**
	 * 字段描述：ids 字段类型：character varying 长度：32
	 */
	public static final String column_ids = "ids";
	/**
	 * 字段描述：机构ids 字段类型：character varying 长度：32
	 */
	public static final String column_organids = "organids";

	/**
	 * 字段描述：日期    
	 */
	public static final String column_date = "date";

	/**
	 * 字段描述：新顾客咨询人数 
	 */
	public static final String column_zxrs = "zxrs";
	
	/**
	 * 字段描述：新顾客总成交人数
	 */
	public static final String column_cjrs = "cjrs";
	
	/**
	 * 字段描述：新顾客转介绍成交人数     
	 */
	public static final String column_zjscjrs = "zjscjrs";
	
	/**
	 * 字段描述：新顾客宣传成交人数         
	 */
	public static final String column_xccjrs = "xccjrs";

	/**
	 * 字段描述：新顾客自然进店成交人数     
	 */
	public static final String column_zrjdcjrs = "zrjdcjrs";

	/**
	 * 字段描述：新顾客成交率       
	 */
	public static final String column_xgkCjl = "xgkCjl";
	/**
	 * 字段描述：新顾客单疗程 数     
	 */
	public static final String column_xgkDlcs = "xgkDlcs";

	/**
	 * 字段描述：新顾客疗程数       
	 */
	public static final String column_xgkLcs = "xgkLcs";
	
	/**
	 * 字段描述：新顾客应减斤数
	 */
	public static final String column_xgkYjjs = "xgkYjjs";
	
	/**
	 * 字段描述：应到店人数
	 */
	public static final String column_yddrs = "yddrs";
	
	/**
	 * 字段描述：实到店人数
	 */
	public static final String column_sddrs = "sddrs";
	/**
	 * 字段描述：巩固人数
	 */
	public static final String column_ggrs = "ggrs";
	
	/**
	 * 字段描述：未到店人数
	 */
	public static final String column_wddrs = "wddrs";
	
	/**
	 * 字段描述：服务人数
	 */
	public static final String column_fwrs = "fwrs";
	
	/**
	 * 字段描述：服务次数
	 */
	public static final String column_fwcs = "fwcs";
	/**
	 * 字段描述：掉秤人数
	 */
	public static final String column_dcrs = "dcrs";
	
	/**
	 * 字段描述：涨秤人数
	 */
	public static final String column_zcrs = "zcrs";
	/**
	 * 字段描述：平秤人数
	 */
	public static final String column_pcrs = "pcrs";
	/**
	 * 字段描述：掉秤人数占比
	 */
	public static final String column_dcrszb = "dcrszb";
	/**
	 * 字段描述：掉秤斤数
	 */
	public static final String column_dcjs = "dcjs";
	/**
	 * 字段描述：涨称斤数
	 */
	public static final String column_zcjs = "zcjs";
	/**
	 * 字段描述：达标人数
	 */
	public static final String column_dbrs = "dbrs";
	/**
	 * 字段描述：使用产品人数
	 */
	public static final String column_sycprs = "sycprs";
	/**
	 * 字段描述：使用产品人户占比
	 */
	public static final String column_sycprszb = "sycprszb";
	/**
	 * 字段描述：紧致清润洁面膏销售数量
	 */
	public static final String column_HF001SalNum = "HF001SalNum";
	/**
	 * 字段描述：紧致清润洁面膏销售金额
	 */
	public static final String column_HF001SalPrice = "HF001SalPrice";
	/**
	 * 字段描述：换能新生紧肤水销售金额
	 */
	public static final String column_HF002SalNum = "HF002SalNum";
	/**
	 * 字段描述：换能新生紧肤水销售金额
	 */
	public static final String column_HF002SalPrice = "HF002SalPrice";
	/**
	 * 字段描述：焕能紧肤润体乳销售数量
	 */
	public static final String column_HF003SalNum = "HF003SalNum";
	/**
	 * 字段描述：焕能紧肤润体乳销售金额
	 */
	public static final String column_HF003SalPrice = "HF003SalPrice";
	/**
	 * 字段描述：焕能抗皱紧致乳霜销售数量
	 */
	public static final String column_HF004SalNum = "HF004SalNum";
	/**
	 * 字段描述：焕能抗皱紧致乳霜销售金额
	 */
	public static final String column_HF004SalPrice = "HF004SalPrice";
	/**
	 * 字段描述：焕能精华液销售数量
	 */
	public static final String column_HF005SalNum = "HF005SalNum";
	/**
	 * 字段描述：焕能精华液销售金额
	 */
	public static final String column_HF005SalPrice = "HF005SalPrice";
	/**
	 * 字段描述：泰和三清销售数量
	 */
	public static final String column_HF011SalNum = "HF011SalNum";
	/**
	 * 字段描述：泰和三清销售金额
	 */
	public static final String column_HF011SalPrice = "HF011SalPrice";
	/**
	 * 字段描述：本草焕能紧肤精油销售数量
	 */
	public static final String column_SS001SalNum = "SS001SalNum";
	/**
	 * 字段描述：本草焕能紧肤精油销售金额
	 */
	public static final String column_SS001SalPrice = "SS001SalPrice";
	/**
	 * 字段描述：本草焕能紧肤膏销售数量
	 */
	public static final String column_SS002SalNum = "SS002SalNum";
	/**
	 * 字段描述：本草焕能紧肤膏销售金额
	 */
	public static final String column_SS002SalPrice = "SS002SalPrice";
	/**
	 * 字段描述：单疗程总数
	 */
	public static final String column_LC002SalNum = "LC002SalNum";
	/**
	 * 字段描述：单疗程总金额
	 */
	public static final String column_LC002SalPrice = "LC002SalPrice";
	/**
	 * 字段描述：标准疗程总数
	 */
	public static final String column_LC001SalNum = "LC001SalNum";
	/**
	 * 字段描述：标准疗程总金额
	 */
	public static final String column_LC001SalPrice = "LC001SalPrice";
	/**
	 * 字段描述：一疗程带售后销售总数
	 */
	public static final String column_LC003SalNum = "LC003SalNum";
	/**
	 * 字段描述：一疗程带售后销售金额
	 */
	public static final String column_LC003SalPrice = "LC003SalPrice";
	/**
	 * 字段描述：药贴数量
	 */
	public static final String column_YT001SalNum = "YT001SalNum";
	/**
	 * 字段描述：药贴总金额
	 */
	public static final String column_YT001SalPrice = "YT001SalPrice";
	/**
	 * 字段描述：减重总销售额
	 */
	public static final String column_jzzxse = "jzzxse";
	
	
	
	/**
	 * 字段描述：销售总额
	 */
	public static final String column_priceTotal = "priceTotal";
	
	/**
	 * 字段描述：当年新顾客到店人数
	 */
	public static final String column_xgkddrs = "xgkddrs";
	
	/**
	 * 字段描述：当年新顾客掉秤人数
	 */
	public static final String column_xgkdcrs = "xgkdcrs";
	/**
	 * 字段描述：当年新顾客掉秤斤数
	 */
	public static final String column_xgkdcjs = "xgkdcjs";
	
	
	/**
	 * 字段描述：当年新顾客涨秤人数
	 */
	public static final String column_xgkzcrs = "xgkzcrs";
	/**
	 * 字段描述：当年新顾客涨秤斤数
	 */
	public static final String column_xgkzcjs = "xgkzcjs";
	
	
	/**
	 * 字段描述：当年新顾客精护人数
	 */
	public static final String column_xgkjhrs = "xgkjhrs";
	/**
	 * 字段描述：当月销售累计
	 */
	public static final String column_dyxslj = "dyxslj";
	
	/**
	 * 字段描述：人均掉秤
	 */
	public static final String column_rjdc = "rjdc";
	
	/**
	 * 字段描述：转入
	 */
	public static final String column_zr = "zr";
	
	/**
	 * 字段描述：转出
	 */
	public static final String column_zc = "zc";
	
	
	
	/**
	 * 日综合select
	 */
	public static final String sqlId_splitPageSelect = "sys.dailyTotalStatistic.splitPageSelect";
	
	

	/**
	 * 日综合select（片区经理）
	 */
	public static final String sqlId_splitPageSelectPQJL = "sys.dailyTotalStatistic.splitPageSelectPQJL";
	
	/**
	 * 日综合from
	 */
	public static final String sqlId_splitPageFrom = "sys.dailyTotalStatistic.splitPageFrom";
	
	/**
	 * 日综合from（片区经理）
	 */
	public static final String sqlId_splitPageFromPQJL = "sys.dailyTotalStatistic.splitPageFromPQJL";
	
	
	/**
	 * 日综合（总部）select
	 */
	public static final String sqlId_zblitPageSelect = "sys.dailyTotalStatistic.zbsplitPageSelect";
	
	/**
	 * 日综合（总部）from
	 */
	public static final String sqlId_zbsplitPageFrom = "sys.dailyTotalStatistic.zbsplitPageFrom";
	
	/**
	 * 日综合（总部）select
	 */
	public static final String sqlId_zblitPageSelect2 = "sys.dailyTotalStatistic.zbsplitPageSelect2";
	
	/**
	 * 日综合（总部）from
	 */
	public static final String sqlId_zbsplitPageFrom2 = "sys.dailyTotalStatistic.zbsplitPageFrom2";
	/**
	 * 日综合（总部查询大区经理）select
	 */
	public static final String sqlId_zbDQJLlitPageSelect = "sys.dailyTotalStatistic.zbDQJLsplitPageSelect";
	
	/**
	 * 日综合（总部查询大区经理）from
	 */
	public static final String sqlId_zbDQJLsplitPageFrom = "sys.dailyTotalStatistic.zbDQJLsplitPageFrom";
	
	
	/**
	 * 日综合（总部详情）select
	 */
	public static final String sqlId_zbinfolitPageSelect = "sys.dailyTotalStatistic.zbinfosplitPageSelect";
	
	/**
	 * 日综合（总部详情）from
	 */
	public static final String sqlId_zbinfosplitPageFrom = "sys.dailyTotalStatistic.zbinfosplitPageFrom";
	
	/**
	 * 日综合查询
	 */
	public static final String sqlId_selectDaily = "sys.dailyTotalStatistic.selectDaily";
	
	
	
	
	
	/**通过机构ids,日期获取日护理综合查询
	 * 
	 * @param organids
	 * @param date
	 * @return
	 */
	public  DailyNursingTotal  getDnt(String organids,Date date)
	{
		String  oldCusSerTotalsql = "SELECT  * FROM  sb_customer_total_daily  WHERE  organids = ?  AND  date_format(date,'%Y-%m-%d') = ?";
		DailyNursingTotal  dnt = DailyNursingTotal.dao.findFirst(oldCusSerTotalsql,organids,ToolDateTime.format(date, ToolDateTime.pattern_ymd));
		return  dnt;
	}
	

}
